﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.Model;
using AspNetCs.SQLServerDAL;
using AspNetCs.DALFactory;
using AspNetCs.IDAL;
using System.Data;
using System.Data.SqlClient;

namespace AspNetCs.Bll
{
    public class LoveWallBLL
    {
        private ILoveWall dal = Conn.CreageLoveWall();

        /// <summary>
        /// 添加许愿信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddLoveWallMsg(LoveWall_Model model)
        {
            return dal.AddLoveWallMsg(model);
        }

        /// <summary>
        /// 获得留言墙的纸条数
        /// </summary>
        /// <returns></returns>
        public int GetLoveWallMsgNum()
        {
            return dal.GetLoveWallMsgNum();
        }

        /// <summary>
        /// 获得留言纸条信息
        /// </summary>
        /// <param name="searchContent">查询条件</param>
        /// <param name="pageIndex">页的索引</param>
        /// <param name="pageSize">每页的留言纸条数</param>
        /// <param name="isCount">是否返回总条数</param>
        /// <returns></returns>
        public SqlDataReader getGetLoveWallMsg(string searchContent, int pageIndex, int pageSize, int isCount)
        {
            return dal.getGetLoveWallMsg(searchContent, pageIndex, pageSize,isCount);
        }
    }
}
